<?php
	include("config/config.php");
	require_once( "cal/calendar.php" );
	include("class/site.func.php");
	
	mysql_connect($dbhost,$dbuname,$dbpasswd) or die ("Cannot connect to database..!!");
	mysql_select_db($dbname) or die ("Cannot select database..!!");

	if ($_GET["polid"] <> "")
	$qry_adpol = mysql_query("update poling_item set poling_item_count=poling_item_count+1 where poling_item_id=".$_GET["polid"]) or die ("Tidak bisa melakukan poling.");

head();

				 if ($_GET["det"] == 1)
				{
					echo "<td class='center-content' width=600>";
					echo "<table class=tbldet align=center bgcolor='#999999' border=0 cellpadding=3 cellspacing=1 width=98%>";
					echo "<tr bgcolor='#006699'><td><font color='#ffffff'><strong>";
					if ($_GET["kd"] == 'news')
					{
						$qry_news = mysql_query("select * from news where news_id=".$_GET["id"]);
						$news = mysql_fetch_array($qry_news);
						echo $news["news_title"]."  <SPAN class=text-tanggal> [".$news["news_post"]."]</SPAN>";
					}
					else if ($_GET["kd"] == 'keg')
						echo "Kegiatan";
					else if ($_GET["kd"] == 'prof')
						echo "Profil Pejabat";
					else if ($_GET["kd"] == 'listnews')
						echo "Berita";
					else if ($_GET["kd"] == 'contact')
						echo "Contact Us";
					echo "</strong></font></td></tr>";
					echo "<tr bgcolor='#CED3FF'><td>";
					if ($_GET["kd"] == 'news')
					{	
						$news = nl2br($news["news_content"]);
						echo $news;
					} else if ($_GET["kd"] == 'keg')
					{
						include("page/keg.php");
					} else if ($_GET["kd"] == 'prof')
					{
						include("page/profil.php");
					} else if ($_GET["kd"] == 'listnews')
					{
						include("page/news.php");
					} else if ($_GET["kd"] == 'contact')
					{
						include("page/contact.php");
					}
					echo "</td></tr>";
					echo "</table>";
					echo "</td>";
				} else
					front();
				{
				

}
foot();
?>				